{extend name='main'}

{block name="button"}
{if auth("add")}
<!--<button data-modal='{:url("add",input(""))}'  class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>-->
{/if}
{/block}

{block name="content"}

<div class="think-box-shadow">
    {include file='company/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-sort-td'>
                <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
            </th>
            <th class='text-left nowrap'>Logo</th>
            <th class='text-left nowrap'>名称</th>
            <th class='text-left nowrap'>企业性质</th>
            <th class='text-left nowrap'>所属行业</th>
            <th class='text-left nowrap'>企业规模</th>
            <th class='text-left nowrap'>联系人</th>
            <th class='text-left nowrap'>联系电话</th>
            <th class='text-left nowrap'>状态</th>
            <th class='text-left nowrap'>更新时间</th>
            <th class='text-center nowrap'>操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-sort-td'>
                <input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
            </td>
            <td class='text-left'>
                <img width="75" src="{$vo.logo|default=''}" data-tips-image>
            </td>
            <td class='text-left nowrap' title="{$vo.name|default=''}">
                {$vo.name|default=''|sub_str=###,30}
            </td>
            <td class='text-left nowrap' title="{$vo.property|default=''}">
                {$vo.property|default=''|sub_str=###,30}
            </td>
            <td class='text-left nowrap' title="{$vo.industry|default=''}">
                {$vo.industry|default=''|sub_str=###,30}
            </td>
            <td class='text-left nowrap' title="{$vo.scale|default=''}">
                {$vo.scale|default=''|sub_str=###,30}
            </td>
            <td class='text-left nowrap'>
                {$vo.contact_user|default=''|sub_str=###,30}
            </td>
            <td class='text-left nowrap'>
                {$vo.contact_mobile|default=''|sub_str=###,30}
            </td>
            <td class='text-left'>
                {switch vo.status }
                {case 1 }<span class="layui-badge layui-bg-green">通过</span>{/case}
                {case 2}<span class="layui-badge">拒绝</span>{/case}
                {default /}<span class="layui-badge-rim">审核中</span>
                {/switch}
            </td>

            <td class="text-left nowrap">
                日期：{$vo.create_at|default=''|str_replace=' ','<br><span class="color-desc">时间：',###|raw}</span>
            </td>

            <td class='text-right operator'>
                {if auth("edit")}
                <a data-dbclick class="layui-btn layui-btn-sm" data-area = "['800px','80dvh']" data-title="编辑" data-modal='{:url("edit")}?id={$vo.id}&spm={:input("spm")}'>编 辑</a>
                {/if}
                {if auth("remove")}
                <a class="layui-btn layui-btn-danger layui-btn-sm" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>
<style>
.operator a{margin-bottom: 5px;}
</style>
{/block}
